package faw.car.ccentersdk.data;

import android.os.Parcel;
import android.os.Parcelable;

public class CarWindowData implements Parcelable {
    /**
     * 车窗移动百分比 取值0～100
     */
    public int windowMovePercentage;
    /**
     * 车窗状态
     * 0x00:WindowStInactive
     * 0x01:WindowStUnknown
     * 0x02:WindowStTop
     * 0x03:WindowStMiddle
     * 0x04:WindowStBottom
     * 0x05:WindowStVentilation
     * 0x06:WindowStOther
     */
    public int windowStatus;

    public CarWindowData() {
    }

    public int getWindowMovePercentage() {
        return windowMovePercentage;
    }

    public void setWindowMovePercentage(int windowMovePercentage) {
        this.windowMovePercentage = windowMovePercentage;
    }

    public int getWindowStatus() {
        return windowStatus;
    }

    public void setWindowStatus(int windowStatus) {
        this.windowStatus = windowStatus;
    }

    protected CarWindowData(Parcel in) {
        windowMovePercentage = in.readInt();
        windowStatus = in.readInt();
    }

    public static final Creator<CarWindowData> CREATOR = new Creator<CarWindowData>() {
        @Override
        public CarWindowData createFromParcel(Parcel in) {
            return new CarWindowData(in);
        }

        @Override
        public CarWindowData[] newArray(int size) {
            return new CarWindowData[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(windowMovePercentage);
        dest.writeInt(windowStatus);
    }

    @Override
    public String toString() {
        return "CarWindowData{" +
                "windowStatus = " + windowStatus +
                ", windowMovePercentage=" + windowMovePercentage +
                "}";
    }
}
